[gd_scene load_steps=5 format=3 uid="uid://btxhk6lbvehet"]

[ext_resource type="Script" path="res://Scripts/Twins.gd" id="1_f37p3"]
[ext_resource type="ArrayMesh" uid="uid://ccfyk3k2qebgs" path="res://Assets/Models/twins.res" id="2_bbg5o"]
[ext_resource type="AudioStream" uid="uid://4li88ajmivq6" path="res://Assets/Sounds/twins_shot.mp3" id="3_dagev"]

[sub_resource type="ConvexPolygonShape3D" id="ConvexPolygonShape3D_fk1qn"]
points = PackedVector3Array(0.606707, 0.229672, 0.44618, 0.324496, 0.392316, 0.288639, 0.390298, 0.223488, 1.52172, 0.451586, 0.117146, 1.52172, 0.606707, 0.00236708, 0.44618, 0.606707, 0.229672, -0.453722, 0.324496, 0.392316, -0.261266, -0.324614, 0.392316, 0.288639, -0.390416, 0.223488, 1.52172, 0.390298, 0.0108027, 1.52172, 0.501828, 0.00236708, 0.620966, 0.606707, 0.00236708, -0.453722, 0.451586, 0.117146, -0.653203, 0.501828, 0.229672, -0.558679, 0.390298, 0.223488, -0.653203, -0.324614, 0.392316, -0.261266, -0.606707, 0.229672, 0.44618, -0.451823, 0.117146, 1.52172, -0.390416, 0.0108027, 1.52172, -0.501947, 0.00236708, 0.620966, 0.501828, 0.00236708, -0.558679, 0.390298, 0.0108027, -0.653203, -0.390416, 0.223488, -0.653203, -0.501947, 0.229672, -0.558679, -0.606707, 0.229672, -0.453722, -0.606707, 0.00236708, 0.44618, -0.501947, 0.00236708, -0.558679, -0.390416, 0.0108027, -0.653203, -0.451823, 0.117146, -0.653203, -0.606707, 0.00236708, -0.453722)

[node name="Twins" type="StaticBody3D"]
script = ExtResource("1_f37p3")
rotation_speed = 1.2
recoil_force = 5
damage = 10

[node name="Twins" type="MeshInstance3D" parent="."]
transform = Transform3D(-1, 0, -8.74228e-08, 0, 1, 0, 8.74228e-08, 0, -1, 0, 0, 0)
layers = 3
mesh = ExtResource("2_bbg5o")

[node name="CollisionShape3D" type="CollisionShape3D" parent="."]
transform = Transform3D(-1, 0, -8.74228e-08, 0, 1, 0, 8.74228e-08, 0, -1, 0, 0, 0)
shape = SubResource("ConvexPolygonShape3D_fk1qn")

[node name="MainAimRay" type="RayCast3D" parent="."]
transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, 7.10543e-15, 0.118692, -1.62469)
target_position = Vector3(0, 0, -100)
collision_mask = 3
collide_with_areas = true
debug_shape_thickness = 5

[node name="T1AimRay" type="RayCast3D" parent="."]
transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, 7.10543e-15, 0.118692, -1.62469)
target_position = Vector3(0, 1.5, -50)
collision_mask = 3
debug_shape_thickness = 5

[node name="T2AimRay" type="RayCast3D" parent="."]
transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, 7.10543e-15, 0.118692, -1.62469)
target_position = Vector3(0, 3, -50)
collision_mask = 3
debug_shape_thickness = 5

[node name="T3AimRay" type="RayCast3D" parent="."]
transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, 7.10543e-15, 0.118692, -1.62469)
target_position = Vector3(0, 4.5, -50)
collision_mask = 3
debug_shape_thickness = 5

[node name="T4AimRay" type="RayCast3D" parent="."]
transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, 7.10543e-15, 0.118692, -1.62469)
target_position = Vector3(0, 6, -50)
collision_mask = 3
debug_shape_thickness = 5

[node name="T5AimRay" type="RayCast3D" parent="."]
transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, 7.10543e-15, 0.118692, -1.62469)
target_position = Vector3(0, 7.5, -50)
collision_mask = 3
debug_shape_thickness = 5

[node name="B1AimRay" type="RayCast3D" parent="."]
transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, 7.10543e-15, 0.118692, -1.62469)
target_position = Vector3(0, -1.5, -50)
collision_mask = 3
debug_shape_thickness = 5

[node name="B2AimRay" type="RayCast3D" parent="."]
transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, 7.10543e-15, 0.118692, -1.62469)
target_position = Vector3(0, -3, -50)
collision_mask = 3
debug_shape_thickness = 5

[node name="B3AimRay" type="RayCast3D" parent="."]
transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, 7.10543e-15, 0.118692, -1.62469)
target_position = Vector3(0, -4.5, -50)
collision_mask = 3
debug_shape_thickness = 5

[node name="B4AimRay" type="RayCast3D" parent="."]
transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, 7.10543e-15, 0.118692, -1.62469)
target_position = Vector3(0, -6, -50)
collision_mask = 3
debug_shape_thickness = 5

[node name="B5AimRay" type="RayCast3D" parent="."]
transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, 7.10543e-15, 0.118692, -1.62469)
target_position = Vector3(0, -7.5, -50)
collision_mask = 3
debug_shape_thickness = 5

[node name="BarrelEnd" type="Node3D" parent="."]
transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, 2.64236e-07, 0.120222, -1.51125)

[node name="BarrelEndLeft" type="Node3D" parent="."]
transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, -0.328824, 0.120222, -1.54334)

[node name="BarrelEndRight" type="Node3D" parent="."]
transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, 0.33076, 0.120222, -1.54334)

[node name="ShotAudio" type="AudioStreamPlayer3D" parent="."]
stream = ExtResource("3_dagev")

[node name="CooldownTimer" type="Timer" parent="."]
wait_time = 0.4

[connection signal="timeout" from="CooldownTimer" to="." method="_on_cooldown_timer_timeout"]
